package Thread;

public class Test {

    public static void main(String[] args) throws InterruptedException {
        Runnable runnable = new MyThread2();
        Thread thread = new Thread(runnable);
        thread.start();

        while (true) {
            System.out.println("main");
            Thread.sleep(1000);
        }
    }


    public static void main1(String[] args) throws InterruptedException {
        Thread thread1 = new MyThread1();
        thread1.start();

        while (true) {
            System.out.println("main");
            Thread.sleep(1000);
        }
    }
}
